﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Vortex.Drawing {
	/// <summary>
	/// Extends <see cref="ISpriteCollection"/> for manipulating with sprites: add, remove etc
	/// </summary>
	public interface ISpriteList : ISpriteCollection {

		/// <summary>
		/// Gets or sets the <see cref="Vortex.Drawing.Sprite"/> at the specified index.
		/// </summary>
		/// <value><see cref="Vortex.Drawing.Sprite"/> at specified index</value>
		new Sprite this[int index] { get; set; }

		/// <summary>
		/// Adds the specified sprite to list.
		/// </summary>
		/// <param name="sprite">The sprite.</param>
		void Add(Sprite sprite);

		/// <summary>
		/// Inserts the specified sprite into specified index.
		/// </summary>
		/// <param name="indexBefore">The index in list to replace with this sprite.</param>
		/// <param name="sprite">The sprite.</param>
		void Insert(int index, Sprite sprite);

		/// <summary>
		/// Removes the specified sprite.
		/// </summary>
		/// <param name="sprite">The sprite.</param>
		/// <returns><c>true</c> if specified sprite was found and removed</returns>
		bool Remove(Sprite sprite);

		/// <summary>
		/// Removes sprite at specified index.
		/// </summary>
		/// <param name="index">The index.</param>
		void RemoveAt(int index);

		/// <summary>
		/// Clears this sprite list.
		/// </summary>
		void Clear();
	}
}
